<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/adminHead.jsp" %>

	<script type="text/javascript" src="${jsUrl}/ajax.js"></script>
	<script type="text/javascript" src="${jsUrl}/common.js"></script>
	<script language="javascript" src="${jsUrl}/calendar.js"></script>
	<script type="text/javascript" src="${jsUrl}/SmartEditorBasic2/js/HuskyEZCreator.js" charset="utf-8"></script>
<script>          

function CheckInput()
{
	var form = document.bbs_form1;
		oEditors[0].exec("UPDATE_IR_FIELD", []);
	if(form.tlt.value.length == 0)
	{
		alert("제목을 입력하세요."); // 주) 제목을 입력하세요.
		form.tlt.focus();
		return false;
	}
	form.submit();
}
</SCRIPT>
             

				<tr style="margin-right:30px">
					<td>
					<FORM action="save_update.php" enctype="multipart/form-data" id="bbs_form1" method="post" name="bbs_form1" style="margin: 0px;">
					    <INPUT name="search_type" type="hidden" value="<?=$search_type?>"/>
					    <INPUT name="search_word" type="hidden" value="<?=$search_word?>"/>
					    <INPUT name="page" type="hidden" value="<?=$page?>"/>
					    <INPUT name="no" type="hidden" value="<?=$no?>"/>
					    <INPUT name="files" type="hidden" value="<?=$row[files]?>"/>
					    <TABLE border="0" cellpadding="0" cellspacing="0" width="97%">
					        <TBODY>
					            <TR>
					                <TD align="left" background="${imgUrl}/title_bg.gif" class="admin_title" valign="middle"><IMG align="absmiddle" href="${imgUrl}/title_icon.gif">자료실(사업소개)</TD>
					                </TR>
					                <TR>
					                    <TD height="20">&nbsp;</TD>
					                </TR>
					                <TR>
					                    <TD>
					                        <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
					                            <TBODY>
					                                <TR>
					                                    <TD>
					                                        <TABLE bgcolor="#d9d9d9" border="0" cellpadding="0" cellspacing="1" width="100%">
					                                            <TBODY>
					                                                <TR>
					                                                    <TD bgcolor="#3f8bc9" colspan="2" height="1"></TD>
					                                                </TR>
					                                                <TR>
					                                                    <TD align="center" bgcolor="#eff3fa" class="top_blue3" width="10%">제목
					                                                    </TD>
					                                                    <TD align="left" bgcolor="#eff3fa" class="top_blue3" style="padding-left: 10px;">
					                                                        <INPUT class="inputText" name="tlt" style="width: 95%;" type="text" value="[?=$row[tlt]?]"/></TD>
					                                                </TR>
					                                                <TR>
					                                                    <TD align="center" bgcolor="#ffffff" class="bold">첨부파일
					                                                    </TD>
					                                                    <TD align="left" bgcolor="#ffffff" class="list_dark" style="padding-left: 10px;">
					                                                        <TABLE cellpadding="0" cellspacing="0" id="variableFiles"></TABLE>
					                                                        <SCRIPT type="text/javascript"  >
					                                                            var flen = 0;
					                                                            function add_file(delete_code) {
					                                                                var upload_count = 0;
					                                                                if (upload_count && flen >= upload_count) {
					                                                                    alert("이 게시판은 " + upload_count + "개 까지만 파일 업로드가 가능합니다.");
					                                                                    return;
					                                                                }
					                                                                var objTbl;
					                                                                var objRow;
					                                                                var objCell;
					                                                                if (document.getElementById) 
					                                                                    objTbl = document.getElementById("variableFiles");
					                                                                else 
					                                                                    objTbl = document.all["variableFiles"];
					                                                                objRow = objTbl.insertRow(objTbl.rows.length);
					                                                                objCell = objRow.insertCell(0);
					                                                                objCell.innerHTML = "[input type='file' size='70' name='bf_file[]' title='파일 용량 $lang_upload_max_filesize 이하만 업로드 가능']";
					                                                                if (delete_code) 
					                                                                    objCell.innerHTML += delete_code;
					                                                                else {;
					                                                                }
					                                                                flen++;
					                                                            }
					                                                            add_file('');
					                                                            function del_file() {
					                                                                var file_length = 0;
					                                                                var objTbl = document.getElementById("variableFiles");
					                                                                if (objTbl.rows.length - 1 > file_length) {
					                                                                    objTbl.deleteRow(objTbl.rows.length - 1);
					                                                                    flen--;
					                                                                }
					                                                            }
					                                                        </SCRIPT>
					                                                    </TD>
					                                                </TR>
					                                                <TR>
					                                                    <TD bgcolor="#ffffff" colspan="2" style="padding: 10px;">
					                                                        <INPUT name="ishtml" type="hidden" value="Y"/>
					                                                            <TEXTAREA class="input1" id="f_content" name="f_content" style="width: 95%; height: 250px; display: none;"><?=$row[content]?>
					                                                            </TEXTAREA>
					                                                                <SCRIPT type="text/javascript">
					                                                                var oEditors = [];
					                                                                nhn.husky.EZCreator.createInIFrame({
					                                                                    oAppRef      : oEditors,
					                                                                    elPlaceHolder: "f_content",
					                                                                    sSkinURI     : "${jsUrl}/SmartEditorBasic2/SmartEditor2Skin.html",
					                                                                    fCreator     : "createSEditorInIFrame"
					                                                                });
					                                                                insertIMG = function (getId, fname) {
					                                                                    var sHTML = "<img src='" + imagepath + "/" + fname + "' style='cursor:hand;' border='0'>";
					                                                                    oEditors.getById[getId].exec("PASTE_HTML", [sHTML]);
					                                                                };
					                                                        </SCRIPT>
					                                                    </TD>
					                                                </TR>
					                                                <TR>
					                                                    <TD align="center" class="bold" bgcolor="#ffffff"> 키워드 등> 
					                                                    </TD>
					                                                        <TD align="left" bgcolor="#ffffff" class="list_dark" style="padding: 10px;">
					                                                            <input name='keyword' size='70' type='text' value="[?=$row[keyword]?]"/><br/>1, 동시에 등록할 수 여러단어를 있습니다 키워드등록은><br/> 2, 가능 구분표시( | )를 다수 등록 키워드는 하면 합니다.><br/> 2, 등록된 키워드는 해당카테고리내에 표시됩니다. 
					                                                    </TD>
					                                                </TR>
					                                            </TBODY>
					                                        </TABLE>
					                                    </TD>
					                                </TR>
					                                <TR>
					                                    <TD align="right" height="35">
					                                        <A href="javascript:CheckInput()"><IMG border="0" hspace="3" href="${imgUrl}/btn_submit.gif"></A>
					                                            <A href="./list.php?page=[?=$page?]&search_type=[?=$search_type?]&search_word=[?=$search_word?]">
					                                          	  <IMG href="${imgUrl}/btn_list.gif" border="0"/>
					                                        	</A>
					                                    </TD>
					                                </TR>
					                          </TBODY>
					                      </TABLE>
					                 </TD>
					             </TR>
					    </TABLE>
					</FORM>
					</td>
                </tr>
			</TBODY>
</TABLE>
</BODY></HTML> 